{literal}
<script type="text/javascript">
<!--
$(function(){
	jQuery.validator.addMethod("zenkaku", function(value, element) {
	  return this.optional(element) || /^[ 　]*[^ -~｡-ﾟ]*[ 　]*$/i.test(value);
	});
	jQuery.validator.addMethod("furikana", function(value, element) {
	  return this.optional(element) || /^[ァ-ヾ]+$/i.test(value);
	});
	jQuery.validator.addMethod("numhifun", function(value, element) {
	  return this.optional(element) ||  /[0-9\-]/i.test(value);
	});
	$("#hpform").validate({
		groups: {
			zip: "Zip1 Zip2 PrefCd Address"
		},
		rules: {
			SoufuKibouJyouhoushi :{
				required: function() { return !($("#SoufuKibouJyouhoushi").val() != ""); }
			},
			Zip1 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address").val() != "")); }
			},
			Zip2 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address").val() != "")); }
			},
			PrefCd :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address").val() != "")); }
			},
			Address :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address").val() != "")); }
			}
		},
		messages: {
			NameSei :{
				required: "※お名前（姓）のご入力をお願いいたします。",
				zenkaku: "※お名前（姓）は全角にてご入力をお願いいたします。"
			},
			NameMei :{
				required: "※お名前（名）のご入力をお願いいたします。",
				zenkaku: "※お名前（名）は全角にてご入力をお願いいたします。"
			},
			KanaSei :{
				required: "※フリガナ（姓）のご入力をお願いいたします。",
				furikana: "※フリガナ（姓）は全角カナにてご入力をお願いいたします。"
			},
			KanaMei :{
				required: "※フリガナ（名）のご入力をお願いいたします。",
				furikana: "※フリガナ（名）は全角カナにてご入力をお願いいたします。"
			},
			Mail :{
				email: "※メールアドレスの形式エラーです。"
			},
			Zip1 :{
				required: "※郵便番号のご入力をお願いいたします。",
				number: "※郵便番号は半角数字でのご入力をお願いいたします。"
			},
			Zip2 :{
				required: "※郵便番号のご入力をお願いいたします。",
				number: "※郵便番号は半角数字でのご入力をお願いいたします。"
			},
			PrefCd :{
				required: "※都道府県のご入力をお願いいたします。"
			},
			Address :{
				required: "※ご住所のご入力をお願いいたします。"
			},
			SoufuKibouJyouhoushi :{
				required: "※送付希望情報誌のご選択をお願いいたします。"
			},
			Tel :{
				required: "※『電話番号』のご入力をお願いいたします。",
				numhifun: "※お電話番号は数字とハイフン（-）にてご入力をお願いいたします。"
			},
			Fax :{
				numhifun: "※お電話番号は数字とハイフン（-）にてご入力をお願いいたします。"
			}
		},
		errorElement: "p",
		errorClass: "errTxt"
	});
})
	//遷移テキスト設定
	function setText(){
		//送付希望情報誌
		if(document.getElementById("SoufuKibouJyouhoushi").value == "1"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "札幌版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "2"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "盛岡版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "4"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "仙台・宮城版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "5"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "新潟版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "6"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "長野版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "24"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "滋賀版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "19"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "松山版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "20"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "福岡版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "21"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "長崎県版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "22"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "大分版";
		}else if(document.getElementById("SoufuKibouJyouhoushi").value == "23"){
			document.getElementById("SoufuKibouJyouhoushiText").value = "熊本版";
		}

		//年齢設定
		if(document.getElementById("AgeKbn").value == "0"){
			document.getElementById("AgeNm").value = "未選択";
		}else if(document.getElementById("AgeKbn").value == "1"){
			document.getElementById("AgeNm").value = "18歳未満";
		}else if(document.getElementById("AgeKbn").value == "2"){
			document.getElementById("AgeNm").value = "20歳未満";
		}else if(document.getElementById("AgeKbn").value == "3"){
			document.getElementById("AgeNm").value = "20～24";
		}else if(document.getElementById("AgeKbn").value == "4"){
			document.getElementById("AgeNm").value = "25～29";
		}else if(document.getElementById("AgeKbn").value == "5"){
			document.getElementById("AgeNm").value = "30～34";
		}else if(document.getElementById("AgeKbn").value == "6"){
			document.getElementById("AgeNm").value = "35～39";
		}else if(document.getElementById("AgeKbn").value == "7"){
			document.getElementById("AgeNm").value = "40～49";
		}else if(document.getElementById("AgeKbn").value == "8"){
			document.getElementById("AgeNm").value = "50～59";
		}else if(document.getElementById("AgeKbn").value == "9"){
			document.getElementById("AgeNm").value = "60歳以上";
		}
		//性別
		if(document.getElementById("Sex0").checked == true){
			document.getElementById("SexNm").value = "男性";
		}else if(document.getElementById("Sex1").checked == true){
			document.getElementById("SexNm").value = "女性";
		}
		//結婚
		if(document.getElementById("Mrrg0").checked == true){
			document.getElementById("MrrgNm").value = "独身";
		}else if(document.getElementById("Mrrg1").checked == true){
			document.getElementById("MrrgNm").value = "既婚";
		}
		//ご職業
		if(document.getElementById("JobKbn").value == "0"){
			document.getElementById("JobNm").value = "未選択";
		}else if(document.getElementById("JobKbn").value == "1"){
			document.getElementById("JobNm").value = "会社員";
		}else if(document.getElementById("JobKbn").value == "2"){
			document.getElementById("JobNm").value = "学生";
		}else if(document.getElementById("JobKbn").value == "3"){
			document.getElementById("JobNm").value = "自営業";
		}else if(document.getElementById("JobKbn").value == "4"){
			document.getElementById("JobNm").value = "無職";
		}else if(document.getElementById("JobKbn").value == "5"){
			document.getElementById("JobNm").value = "フリーター";
		}else if(document.getElementById("JobKbn").value == "6"){
			document.getElementById("JobNm").value = "その他";
		}
		//都道府県
		if(document.getElementById("PrefCd").value == "01"){
			document.getElementById("PrefName").value = "北海道";
		}else if(document.getElementById("PrefCd").value == "02"){
			document.getElementById("PrefName").value = "青森県";
		}else if(document.getElementById("PrefCd").value == "03"){
			document.getElementById("PrefName").value = "岩手県";
		}else if(document.getElementById("PrefCd").value == "04"){
			document.getElementById("PrefName").value = "宮城県";
		}else if(document.getElementById("PrefCd").value == "05"){
			document.getElementById("PrefName").value = "秋田県";
		}else if(document.getElementById("PrefCd").value == "06"){
			document.getElementById("PrefName").value = "山形県";
		}else if(document.getElementById("PrefCd").value == "07"){
			document.getElementById("PrefName").value = "福島県";
		}else if(document.getElementById("PrefCd").value == "08"){
			document.getElementById("PrefName").value = "茨城県";
		}else if(document.getElementById("PrefCd").value == "09"){
			document.getElementById("PrefName").value = "栃木県";
		}else if(document.getElementById("PrefCd").value == "10"){
			document.getElementById("PrefName").value = "群馬県";

		}else if(document.getElementById("PrefCd").value == "11"){
			document.getElementById("PrefName").value = "埼玉県";
		}else if(document.getElementById("PrefCd").value == "12"){
			document.getElementById("PrefName").value = "千葉県";
		}else if(document.getElementById("PrefCd").value == "13"){
			document.getElementById("PrefName").value = "東京都";
		}else if(document.getElementById("PrefCd").value == "14"){
			document.getElementById("PrefName").value = "神奈川県";
		}else if(document.getElementById("PrefCd").value == "15"){
			document.getElementById("PrefName").value = "新潟県";
		}else if(document.getElementById("PrefCd").value == "16"){
			document.getElementById("PrefName").value = "富山県";
		}else if(document.getElementById("PrefCd").value == "17"){
			document.getElementById("PrefName").value = "石川県";
		}else if(document.getElementById("PrefCd").value == "18"){
			document.getElementById("PrefName").value = "福井県";
		}else if(document.getElementById("PrefCd").value == "19"){
			document.getElementById("PrefName").value = "山梨県";
		}else if(document.getElementById("PrefCd").value == "20"){
			document.getElementById("PrefName").value = "長野県";

		}else if(document.getElementById("PrefCd").value == "21"){
			document.getElementById("PrefName").value = "岐阜県";
		}else if(document.getElementById("PrefCd").value == "22"){
			document.getElementById("PrefName").value = "静岡県";
		}else if(document.getElementById("PrefCd").value == "23"){
			document.getElementById("PrefName").value = "愛知県";
		}else if(document.getElementById("PrefCd").value == "24"){
			document.getElementById("PrefName").value = "三重県";
		}else if(document.getElementById("PrefCd").value == "25"){
			document.getElementById("PrefName").value = "滋賀県";
		}else if(document.getElementById("PrefCd").value == "26"){
			document.getElementById("PrefName").value = "京都府";
		}else if(document.getElementById("PrefCd").value == "27"){
			document.getElementById("PrefName").value = "大阪府";
		}else if(document.getElementById("PrefCd").value == "28"){
			document.getElementById("PrefName").value = "兵庫県";
		}else if(document.getElementById("PrefCd").value == "29"){
			document.getElementById("PrefName").value = "奈良県";
		}else if(document.getElementById("PrefCd").value == "30"){
			document.getElementById("PrefName").value = "和歌山県";

		}else if(document.getElementById("PrefCd").value == "31"){
			document.getElementById("PrefName").value = "鳥取県";
		}else if(document.getElementById("PrefCd").value == "32"){
			document.getElementById("PrefName").value = "島根県";
		}else if(document.getElementById("PrefCd").value == "33"){
			document.getElementById("PrefName").value = "岡山県";
		}else if(document.getElementById("PrefCd").value == "34"){
			document.getElementById("PrefName").value = "広島県";
		}else if(document.getElementById("PrefCd").value == "35"){
			document.getElementById("PrefName").value = "山口県";
		}else if(document.getElementById("PrefCd").value == "36"){
			document.getElementById("PrefName").value = "徳島県";
		}else if(document.getElementById("PrefCd").value == "37"){
			document.getElementById("PrefName").value = "香川県";
		}else if(document.getElementById("PrefCd").value == "38"){
			document.getElementById("PrefName").value = "愛媛県";
		}else if(document.getElementById("PrefCd").value == "39"){
			document.getElementById("PrefName").value = "高知県";
		}else if(document.getElementById("PrefCd").value == "40"){
			document.getElementById("PrefName").value = "福岡県";

		}else if(document.getElementById("PrefCd").value == "41"){
			document.getElementById("PrefName").value = "佐賀県";
		}else if(document.getElementById("PrefCd").value == "42"){
			document.getElementById("PrefName").value = "長崎県";
		}else if(document.getElementById("PrefCd").value == "43"){
			document.getElementById("PrefName").value = "熊本県";
		}else if(document.getElementById("PrefCd").value == "44"){
			document.getElementById("PrefName").value = "大分県";
		}else if(document.getElementById("PrefCd").value == "45"){
			document.getElementById("PrefName").value = "宮崎県";
		}else if(document.getElementById("PrefCd").value == "46"){
			document.getElementById("PrefName").value = "鹿児島県";
		}else if(document.getElementById("PrefCd").value == "47"){
			document.getElementById("PrefName").value = "沖縄県";
		}

		//掲載して欲しい物件の特集記事
		var needTokushuuArray = "";
		var needTokushuuStr = "";
		if(document.getElementById("NeedTokushuu1").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			needTokushuuStr = needTokushuuStr + "新築物件";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		if(document.getElementById("NeedTokushuu2").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			if(needTokushuuStr != ""){
				needTokushuuStr = needTokushuuStr + "，";
			}
			needTokushuuStr = needTokushuuStr + "ペット相談可物件";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		if(document.getElementById("NeedTokushuu3").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			if(needTokushuuStr != ""){
				needTokushuuStr = needTokushuuStr + "，";
			}
			needTokushuuStr = needTokushuuStr + "ダブルゼロ（敷金・礼金ゼロ）物件";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		if(document.getElementById("NeedTokushuu4").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			if(needTokushuuStr != ""){
				needTokushuuStr = needTokushuuStr + "，";
			}
			needTokushuuStr = needTokushuuStr + "戸建て物件";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		if(document.getElementById("NeedTokushuu5").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			if(needTokushuuStr != ""){
				needTokushuuStr = needTokushuuStr + "，";
			}
			needTokushuuStr = needTokushuuStr + "デザイナーズアパート・マンション";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		if(document.getElementById("NeedTokushuu6").checked == true){
			needTokushuuArray = needTokushuuArray + 1;
			if(needTokushuuStr != ""){
				needTokushuuStr = needTokushuuStr + "，";
			}
			needTokushuuStr = needTokushuuStr + "その他（" + document.getElementById("NeedTokushuuSonota").value + "）";
		}else{
			needTokushuuArray = needTokushuuArray + 0;
		}
		document.getElementById("NeedTokushuu").value = needTokushuuArray;
		document.getElementById("NeedTokushuuText").value = needTokushuuStr;

		//引越し理由
		document.getElementById("HikkoshiRiyuuText").value = "";
		if(document.getElementById("HikkoshiRiyuu1").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "契約更新";
		}else if(document.getElementById("HikkoshiRiyuu2").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "独立";
		}else if(document.getElementById("HikkoshiRiyuu3").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "就職・転職";
		}else if(document.getElementById("HikkoshiRiyuu4").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "転勤";
		}else if(document.getElementById("HikkoshiRiyuu5").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "進学";
		}else if(document.getElementById("HikkoshiRiyuu6").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "結婚";
		}else if(document.getElementById("HikkoshiRiyuu7").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "子供の誕生・成長";
		}else if(document.getElementById("HikkoshiRiyuu8").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "狭くなった";
		}else if(document.getElementById("HikkoshiRiyuu9").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "周辺環境に不満";
		}else if(document.getElementById("HikkoshiRiyuu10").checked == true){
			document.getElementById("HikkoshiRiyuuText").value = "その他（" + document.getElementById("HikkoshiRiyuuSonota").value + "）";
		}

		//きっかけ
		document.getElementById("KikkakeText").value = "";
		if(document.getElementById("Kikkake1").checked == true){
			document.getElementById("KikkakeText").value = "書店・コンビニで見て";
		}else if(document.getElementById("Kikkake2").checked == true){
			document.getElementById("KikkakeText").value = "知人からの紹介";
		}else if(document.getElementById("Kikkake3").checked == true){
			document.getElementById("KikkakeText").value = "アパマンショップのホームページを見て";
		}else if(document.getElementById("Kikkake4").checked == true){
			document.getElementById("KikkakeText").value = "TVCMを見て";
		}else if(document.getElementById("Kikkake5").checked == true){
			document.getElementById("KikkakeText").value = "その他（" + document.getElementById("KikkakeSonota").value + "）";
		}

		//購入経験
		document.getElementById("KounyuuKeikenText").value = "";
		if(document.getElementById("KounyuuKeiken1").checked == true){
			document.getElementById("KounyuuKeikenText").value = "ある";
		}else if(document.getElementById("KounyuuKeiken2").checked == true){
			document.getElementById("KounyuuKeikenText").value = "ない";
		}

		//参考雑誌
		document.getElementById("SonotaZassiText").value = "";
		if(document.getElementById("SonotaZassi1").checked == true){
			document.getElementById("SonotaZassiText").value = "はい（情報誌「" + document.getElementById("SonotaZassiName").value + "」）";
		}else if(document.getElementById("SonotaZassi2").checked == true){
			document.getElementById("SonotaZassiText").value = "いいえ（情報誌「アパマンショップ」のみ）";
		}else if(document.getElementById("SonotaZassi3").checked == true){
			document.getElementById("SonotaZassiText").value = "賃貸情報誌は読んでいない";
		}

		//部屋探し重視項目
		var jyuushiKoumokuArray = "";
		var jyuushiKoumokuStr = "";
		if(document.getElementById("JyuushiKoumoku1").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			jyuushiKoumokuStr = jyuushiKoumokuStr + "家賃";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku2").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "間取";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku3").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "駅からの距離（時間）";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku4").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "駐車場の有無";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku5").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "築年数";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku6").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "周辺環境";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku7").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "設備";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		if(document.getElementById("JyuushiKoumoku8").checked == true){
			jyuushiKoumokuArray = jyuushiKoumokuArray + "1";
			if(jyuushiKoumokuStr != ""){
				jyuushiKoumokuStr = jyuushiKoumokuStr + "，";
			}
			jyuushiKoumokuStr = jyuushiKoumokuStr + "その他（" + document.getElementById("JyuushiKoumokuSonota").value + "）";
		}else{
			jyuushiKoumokuArray = jyuushiKoumokuArray + "0";
		}
		document.getElementById("JyuushiKoumoku").value = jyuushiKoumokuArray;
		document.getElementById("JyuushiKoumokuText").value = jyuushiKoumokuStr;
	}

	//情報誌のご案内確認画面へ遷移
	function magazineEntrySubmit(){
		if($("#hpform").valid()){
			setText();

			//submit
			var fm = document.getElementById("hpform");
			fm.action = '{/literal}{$sslurl}{literal}inquiry/magazinecnf/';
			fm.submit();
		}
	}
	//情報誌のご案内完了画面へ遷移
	function magazineSendSubmit(){
		if($("#hpform").valid()){
			setText();

			//submit
			var fm = document.getElementById("hpform");
			fm.action = '{/literal}{$sslurl}{literal}inquiry/magazinesend/';
			fm.submit();
		}
	}
	//情報誌のご案内完了画面へ遷移
	function magazineCnfSubmit(){
		var fm = document.getElementById("hpform");
		fm.action = '{/literal}{$sslurl}{literal}inquiry/magazinesend/';
		fm.submit();
	}
	//情報誌のご案内確認画面から情報誌のご案内入力画面へ遷移
	function magazineBackToEntry(){
		var fm = document.getElementById("hpform");
		fm.action = '/inquiry/magazineentry/';
		fm.submit();
	}
//-->
</script>
{/literal}